﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HeresyManager.Traits
{
    [Serializable]
    public class CredoOmnissiah : Trait
    {
        public override string Name
        {
            get { return "Credo Omnissiah"; }
        }

        Talents.TechnicalKnock telent;


        public override IEnumerator<Comunication.Comunicator> Accire(Character c)
        {
            telent = new Talents.TechnicalKnock();
            var e = base.Accire(c);
            while (e.MoveNext())
                yield return e.Current;
            e = c.AddTalent(telent, this);
            while (e.MoveNext())
                yield return e.Current;
        }

        public override void DeAccire(Character c)
        {
            base.DeAccire(c);
            c.RemoveTalent(telent, this);
        }
    }
}
